package com.onec.service.im.service.client;

import java.util.Scanner;

/**
 * 登录queren jiekou
 */
public class LoginConsoleCommand implements BaseCommandService {

    public static final String KEY = "1";

    public String userName;
    public String password;

    @Override
    public void exec(Scanner scanner) {
        System.out.println("请输入用户信息：");

        String[] info = null;
        while (true) {
            String input = scanner.next();
            info = input.split(":");
            if (info.length != 2) {
                System.out.println("用户密码输入格式不正确");
            } else {
                break;
            }
            userName = info[0];
            password = info[1];
        }
    }

    @Override
    public String getKey() {
        return null;
    }

    @Override
    public String getTip() {
        return null;
    }
}
